<template>
  <div class="UserDetail_max">
    <div class="UserDetail">
      <div class="UserDetail_right">
        <img :src="userInfo.user_img" v-if="userInfo.user_img" />
        <img src="../../assets/user.jpg" v-else />
      </div>
      <div class="UserDetail_left">
        <div class="UserDetail_left_top">
          <p>
            <span>99</span>
            <span>粉丝</span>
          </p>
          <span class="user_i"></span>
          <p>
            <span>99</span>
            <span>关注</span>
          </p>
          <span class="user_i"></span>
          <p>
            <span>99</span>
            <span>获赞</span>
          </p>
        </div>
        <div class="UserDetail_left_button" @click="$router.push('/EtidUser')">编辑资料</div>
      </div>
    </div>
    <div class="UserDetail_title">
      <h1>{{userInfo.name}}</h1>
      <p v-if="userInfo.user_desc">{{userInfo.user_desc}}</p>
      <p v-else>这个家伙很懒，啥也没有留，可能去吃鱼了！</p>
    </div>
    <div>
      <van-tabs v-model="active">
        <van-tab title="动态"></van-tab>
        <van-tab title="视频"></van-tab>
      </van-tabs>
    </div>
  </div>
</template>

<script>
export default {
  props: ["userInfo"],
  data() {
    return {
      active: 2
    };
  }
};
</script>

<style lang="less" scoped>
.UserDetail_max {
  background-color: #fff;
  .UserDetail {
    padding: 0vw 2.778vw;
    display: flex;
    padding-bottom: 1.389vw;
    .UserDetail_right {
      width: 27.778vw;
      position: relative;
      margin-right: 5.5vw;
      img {
        position: absolute;
        top: -2.778vw;
        left: 50%;
        transform: translate(-50%, 0);
        width: 23vw;
        height: 23vw;
        border-radius: 50%;
        box-shadow: 0 0 2.778vw #ccc;
      }
    }
    .UserDetail_left {
      flex: 1;
      .UserDetail_left_top {
        display: flex;
        justify-content: space-around;
        margin: 2.778vw 0;
        p {
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          span:nth-child(1) {
            color: rgb(117, 103, 111);
            font-size: 3.889vw;
          }
          span:nth-child(2) {
            font-size: 3.333vw;
            color: #cccc;
          }
        }
        .user_i {
          width: 0.278vw;
          display: inline-block;
          height: 4.167vw;
          background-color: rgb(189, 183, 183);
          border: none;
          margin-top: 2.778vw;
        }
      }
      .UserDetail_left_button {
        padding: 1.389vw 0;
        border: 1px solid #ffa9b5;
        color: #ffa9b5;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 2.778vw;
        font-size: 3.333vw;
      }
    }
  }
  .UserDetail_title {
    padding: 0vw 2.778vw;
    h1 {
      font-size: 5vw;
      margin: 2vw 0;
      font-weight: 550;
      color: #212121;
    }
    p {
      font-size: 3.611vw;
      color: #999;
      margin: 1.389vw 0;
    }
  }
}
</style>